<template>
	<div>
		<el-row :span="24" style="margin:26px 0;">
		     <el-button  @click="goBack()" type="primary" >返回</el-button>
		</el-row>
		<div>
			<el-table
			        :data="pageInfo.dtos"
			        border
			        stripe
			        style="width: 100%;margin-top:10px;">
			    <el-table-column
			            prop="orderTime" 
			            label="日期">
			     
			    </el-table-column>
			    <el-table-column
			            label="提现金额"
						prop="transferAmount">
			
			    </el-table-column>
			    <el-table-column
			            label="提现方式"
						prop="cardName">
			    </el-table-column>
				<el-table-column
				        label="提现状态"
						>
						<template scope="scope">
						    <span v-if="scope.row.status == 'TRANSFER_SUCCESS' ">成功</span>
							<span v-if="scope.row.status == 'P' ">处理中</span>
							<span v-if="scope.row.status == 'F' ">失败</span>
						</template>
				</el-table-column>
			</el-table>
			<div class="paginate">
			    <el-pagination
			            @current-change="handleCurrentChange"
			            :current-page="pageInfo.pageNum"
			            :page-size="pageInfo.pageSize"
			            layout="total, prev, pager, next, jumper"
			            :total="pageInfo.count"
			            >
			    </el-pagination>
			</div>
		</div>
		
	</div>
	
</template>

<script>
	export default {
		data() {
			return {
				activeName: 'first',
				value: '',
						table_loading: false,
						formInline: {
						    userName:'',
							userId: '',
							userNum: '',
							changeType: '0',
						    sort:'CRE_TIME',
						    desc:'DESC',
						    pageNum:1,
						    pageSize: 10
						},
						type: '',
						pageInfo: {
						    pageNum: 1,
						    pageSize: 10,
						    count: 1,
						    dtos:[]
						},
						formActStatList: [
							{
								value: 'B',
								label: '审核中'
							},
							{
								value: 'L',
								label: '平台拒绝'
							},
							{
								value: 'P',
								label: '平台通过'
							},
							{
								value: 'F',
								label: '快捷通拒绝'
							},
							{
								value: 'S',
								label: '通过'
							}
						],
						moneyInfo: [
							{
								userName: '',
								sumIncomeToday: '',
								sumIncome: ''
							}
						]
			}
		},
		created() {
	
		},
		activated() {
		    this.fetchData(1);
		},
		methods: {
			goBack(){
				this.$router.push({path:"/user/creator_detail/",query:{id:this.$route.params.id}})
				// this.$router.push('/user/creator_detail/' +$route.query.id)
			},
			changeType() {
				console.log('change创客筛选条件')
			},
			handleClick(tab, event) {
				if(this.activeName == 'first') {
					this.fetchData(1);
				}
			},
			// 提现记录
			fetchData(page = 1) {
				let rid =this.$route.params.id
				this.pageInfo.pageNum = page
				this.formInline.pageNum = this.pageInfo.pageNum
				this.formInline.userId = rid
			    this.table_loading = true;
			    this.dataApi.ajax('markerWithdrawList',this.formInline, res => {
			        this.table_loading = false;
			        if (res.responseType === 'S') {
			            this.pageInfo = res
						console.log(this.pageInfo,'提现记录')
			        }
			    });
			
			},
			handleCurrentChange(val) {
			   this.fetchData(val)            
			},
		}
	}
</script>

<style>
</style>
